package jspeech.exception;

/**
 * A EngineConnectionException is thrown if the engine refuse to connect the
 * socket or the socket between the engines and Java fail to establish.
 * 
 * @author Kenneth
 * 
 */
public class EngineConnectionException extends RuntimeException {

	/**
	 * EngineConnectionException Version UID
	 */
	public static final long serialVersionUID = 1;

	/**
	 * Constructs a EngineConnectionException with the specified detail message.
	 * 
	 * @param message
	 *            the detail message
	 */
	public EngineConnectionException(String message) {
		super("Fail to connect to the SDK.\n" + message);
	}

	/**
	 * Constructs a EngineConnectionException with the specified detail message
	 * and the exception message
	 * 
	 * @param message
	 *            the detail message
	 * @param e
	 *            the exception message
	 */
	public EngineConnectionException(String message, Exception e) {
		super("Fail to connect to the SDK.\n" + message + "\n" + "IOException:"
				+ e.getMessage());
	}
}
